<template>
  <div class="login">
    <div class="img">
      父组件<input type="text"
             v-model="name">
    </div>
    <hr>
    <!-- 子组件 -->
    <!-- <propSon :names='name'
              @toFathers="getSon" /> -->
    <propSon :names.sync='name' />
  </div>
</template>

<script>
import propSon from './propSon'
export default {
  components: {
    propSon
  },
  data () {
    return {
      name: ''
    }
  },
  methods: {
    getSon (name) {
      // console.log(name)
      this.name = name
    }
  },
}
</script>

<style scoped lang='less'>
.login {
  height: 100vh;
  // .img {
  //   width: 100px;
  //   height: 100px;
  //   background-color: pink;
  // }
}
</style>